package com.ruoyi.dynamic.model.pojo.request.crm;


import com.ruoyi.common.core.annotation.valid.group.ValidGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Getter
@Setter
@Schema(description = "CRM-礼物管理-添加编辑礼物参数")
public class CrmGiftAddOrEditRequest {
    @Schema(description = "礼物名称")
    private Long id = 0L;


    @Schema(description = "礼物名称")
    @NotBlank(message = "礼物名不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    @Length(max = 20, message = "礼物名称最大20字符", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private String giftName;

    @Schema(description = "礼物封面图")
    @NotBlank(message = "礼物封面图不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private String giftImg;

    @Schema(description = "礼物价格")
    @DecimalMin(value = "1", message = "礼物价格最低1钻石", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private BigDecimal giftPrice;

    @Schema(description = "礼物类型(0普通礼物)")
    @NotNull(message = "礼物类型不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private Integer giftType;

    @Schema(description = "礼物持续时间")
    @NotNull(message = "礼物持续时间不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private Integer giftTime;

    @Schema(description = "平台抽取比例")
    private Integer takePercent;

    @Schema(description = "特效视频")
    @NotBlank(message = "特效视频不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private String video;

    @Schema(description = "礼物排序")
    @NotNull(message = "礼物排序不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private Integer sort;

    @Schema(description = "礼物标识")
    private String giftMark;

    @Schema(description = "推送通知文字")
    private String flyWord;

    @Schema(description = "礼物特效类型")
    @NotNull(message = "礼物特效类型不能为空", groups = {ValidGroup.Insert.class, ValidGroup.Update.class})
    private Integer type;
}
